OTGetIndexedPort
Iterates through the ports available on your computer.C INTERFACE
Boolean OTGetIndexedPort (OTPortRecord* record, size_t index);C++ INTERFACES
None. C++ applications use the C interface to this function.PARAMETERS
record
- A pointer to a port structure that contains information about a specific port on your computer.
index
- An index number.
DESCRIPTION
TheOTGetIndexedPort
function returns information about the ports available on your local system. To iterate through all the ports on your computer, call the function repeatedly, incrementing theindex
parameter each time (starting with 0) until the function returnsfalse
. Each time the function returnstrue
, it fills in the port structure that you provide with information about a specific port. You can use this information, for example, when specifying a provider configuration string for theOTCreateConfiguration
function.You must allocate the port structure; the function fills this structure with information about the port indicated by the
index
parameter. If the function returnsfalse
, the contents of the structure are not significant.SEE ALSO
For information about finding ports, see the sections "About Port Information" (page 6-5) and "Obtaining Port Information" (page 6-11).The port structure is described in "The Port Structure" (page 6-17).